package com.lxxie.commons;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

public class CollectionUtil {
    private CollectionUtil() {
    }

    public static <T> boolean isEmpty(Collection<T> collection) {
        return null == collection || collection.isEmpty();
    }

    public static <T, R> boolean isEmpty(Map<T, R> map) {
        return null == map || map.isEmpty();
    }

    public static <T> boolean isNotEmpty(Collection<T> collection) {
        return !isEmpty(collection);
    }

    public static <T, R> boolean isNotEmpty(Map<T, R> map) {
        return !isEmpty(map);
    }
}
